<?php
	
	
	class xl_tinh_thanh extends database
	{
		function danhSachTinhThanh()
		{
			$this->setQuerry('select * from tinhthanh order by TenTinhThanh  asc');
			$result = $this->loadAllRow();
			return $result;
		}
		function themTinhThanh($tentinhthanh)
		{
			$this->setQuerry("insert into tinhthanh values(N'$tentinhthanh')");
			$result=$this->querry();
			return $result;
		}
		function capNhatTinhThanh($matinhthanh,$tentinhthanh)
		{
			$this->setQuerry("update tinhthanh set TenTinhThanh='$tentinhthanh' where MaTinhThanh=$matinhthanh");
			$result=$this->querry();
			return $result;
		}
		function xoaTinhThanh($matinhthanh)
		{
			$this->setQuerry("delete from tinhthanh where MaTinhThanh=$matinhthanh");
			$result=$this->querry();
			return $result;
		}
	}
?>